package select;

import java.util.Scanner;

public class MultipleIfElseDemo {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int score;
        System.out.println("请输入考试成绩:");
        score = sc.nextInt();
        if (score > 100 || score < 0) {
            System.out.println("考试分数非法！");
            System.exit(0); //程序无条件立即退出。
        }

        if(score>=90 && score<=100){
            System.out.println("成绩优秀");
        }else if(score>=80 && score<90){
            System.out.println("成绩良好");
        }else if(score>=60 && score<80){
            System.out.println("成绩及格");
        }else{
            System.out.println("不及格");
        }
    }
}
